package com.googlecode.lookie.logview.internal;

import org.springframework.context.support.StaticMessageSource;
import org.springframework.richclient.table.BeanTableModel;

import com.googlecode.lookie.core.log.LogRecord;

@SuppressWarnings("unchecked")
public class LogTableModel
    extends BeanTableModel
{

    public LogTableModel()
    {
        super( LogRecord.class, new StaticMessageSource() );
    }

    private static final long serialVersionUID = -7385361311943505429L;

    @Override
    protected String[] createColumnPropertyNames()
    {
        return new String[] { "message", "timestamp" };
    }

    @Override
    protected Class<?>[] createColumnClasses()
    {
        return new Class[] { String.class, long.class };
    }

}
